package com.example.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.util.Date;

@Data
@Builder
@ApiModel("停车收费配置")
@TableName("parking_fee_config")
public class ParkingFeeConfig extends DayHourChargeConfig{

    @ApiModelProperty(value = "主键ID")
    private Long id;

    @ApiModelProperty(value = "配置名称")
    private String configName;

    @ApiModelProperty(value = "免费时间(分钟)")
    private Integer freeTime;

    @ApiModelProperty(value = "封顶收费金额")
    private BigDecimal chargeMaxAmount;

    @ApiModelProperty(value = "过夜费")
    private BigDecimal overNightCharges;

    @ApiModelProperty(value = "首停单位(分钟)")
    private Integer firstUnit;

    @ApiModelProperty(value = "首停收费金额")
    private BigDecimal firstCharge;

    @ApiModelProperty(value = "停车时间是否包含免费时间")
    private Boolean isFreeTimeCount;

    @ApiModelProperty(value = "封顶收费是否包含过夜费")
    private Boolean isTopContainOverNight;

    @ApiModelProperty(value = "是否启用多次进出按天封顶")
    private Boolean isDayChargeLimit;

    @ApiModelProperty(value = "多次进出按天封顶方式(1-0~24点收费，2-停车24小时)")
    private Integer dayChargeLimitType;

    @ApiModelProperty(value = "多次停车每日收费限制金额")
    private BigDecimal dayChargeLimitCharge;

    @ApiModelProperty(value = "单次限额")
    private BigDecimal onceTop;

    @ApiModelProperty(value = "过夜开始时间")
    @JSONField(format = "HH:mm:ss")
    private LocalTime overNightStart;

    @ApiModelProperty(value = "过夜结束时间")
    @JSONField(format = "HH:mm:ss")
    private LocalTime overNightEnd;

    @ApiModelProperty(value = "过夜时长")
    private BigDecimal overNightUnit;

    @ApiModelProperty(value = "开启半小时(0-关闭,1-开启)")
    private Integer half;

    @ApiModelProperty(value = "1小时收费")
    private BigDecimal oneHoursCharge;

    @ApiModelProperty(value = "2小时收费")
    private BigDecimal twoHoursCharge;

    @ApiModelProperty(value = "3小时收费")
    private BigDecimal threeHoursCharge;

    @ApiModelProperty(value = "4小时收费")
    private BigDecimal fourHoursCharge;

    @ApiModelProperty(value = "5小时收费")
    private BigDecimal fiveHoursCharge;

    @ApiModelProperty(value = "6小时收费")
    private BigDecimal sixHoursCharge;

    @ApiModelProperty(value = "7小时收费")
    private BigDecimal sevenHoursCharge;

    @ApiModelProperty(value = "8小时收费")
    private BigDecimal eightHoursCharge;

    @ApiModelProperty(value = "9小时收费")
    private BigDecimal nineHoursCharge;

    @ApiModelProperty(value = "10小时收费")
    private BigDecimal tenHoursCharge;

    @ApiModelProperty(value = "11小时收费")
    private BigDecimal elevenHoursCharge;

    @ApiModelProperty(value = "12小时收费")
    private BigDecimal twelveHoursCharge;

    @ApiModelProperty(value = "状态(0-禁用,1-启用)")
    private Integer status;

    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新时间")
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "创建人")
    private String createBy;

    @ApiModelProperty(value = "更新人")
    private String updateBy;

    @ApiModelProperty(value = "备注")
    private String remark;

    @Data
    @NoArgsConstructor
    @AllArgsConstructor
    @Builder
    public static class HourlyRate {
        private int hours;
        private BigDecimal rate;
    }
}
